home *** CD-ROM | disk | FTP | other *** search
-
- /*
- ** PREPARE.C - This is the module containing the code for SQL for
- ** preparing SQL Commands and other functions prior to execution.
- **
- ** (C) Copyright 1991, 1992 By Microsoft Corp.
- */
-
-
- #include <Memory.h>
- #include "sample.h"
- //#include <dos.h>
-
-
- // Allocate a SQL statement
-
- SQL_PRE_API RETCODE SQL_API
- SQLAllocStmt(
- HDBC hdbc,
- HSTMT FAR *phstmt)
- {
- HSTMT hstmt;
-
- //debugstr( "Sample Driver: SQLAllocStmt" );
- hstmt = (HSTMT)NewHandleClear( sizeof( STMT ) );
- if( hstmt == NULL )
- {
- *phstmt = SQL_NULL_HSTMT;
- return SQL_ERROR;
- }
- HLock( (Handle)hstmt );
- *phstmt = hstmt;
- return SQL_SUCCESS;
- }/* end SQLAllocStmt */
-
-
- SQL_PRE_API RETCODE SQL_API
- SQLFreeStmt(
- HSTMT hstmt,
- UWORD fOption)
- {
- if (fOption == SQL_DROP )
- {
- HUnlock( (Handle)hstmt );
- DisposHandle( (Handle)hstmt );
- }
- return SQL_SUCCESS;
- }/* end SQLFreeStmt */
-
-
- // Perform a Prepare on the SQL statement
-
- SQL_PRE_API RETCODE SQL_API
- SQLPrepare(
- HSTMT hstmt,
- UCHAR FAR *szSqlStr,
- SDWORD cbSqlStr)
- {
- return SQL_SUCCESS;
- }/* end SQLPrepare */
-
-
- // Set parameters on a statement handle
-
- SQL_PRE_API RETCODE SQL_API
- SQLSetParam( /* Use SQLBindParameter */
- HSTMT hstmt,
- UWORD ipar,
- SWORD fCType,
- SWORD fSqlType,
- UDWORD cbColDef,
- SWORD ibScale,
- PTR rgbValue,
- SDWORD FAR *pcbValue)
- {
- return SQL_SUCCESS;
- }
-
- // SQLBindParameter
-
- SQL_PRE_API RETCODE SQL_API
- SQLBindParameter(
- HSTMT hstmt,
- UWORD ipar,
- SWORD fParamType,
- SWORD fCType,
- SWORD fSqlType,
- UDWORD cbColDef,
- SWORD ibScale,
- PTR rgbValue,
- SDWORD cbValueMax,
- SDWORD FAR *pcbValue)
- {
- return SQL_SUCCESS;
- }
-
- // Returns the description of a parameter marker.
-
- SQL_PRE_API RETCODE SQL_API
- SQLDescribeParam(
- HSTMT hstmt,
- UWORD ipar,
- SWORD FAR *pfSqlType,
- UDWORD FAR *pcbColDef,
- SWORD FAR *pibScale,
- SWORD FAR *pfNullable)
- {
- return SQL_SUCCESS;
- }
-
-
- // Sets multiple values (arrays) for the set of parameter markers.
-
- SQL_PRE_API RETCODE SQL_API
- SQLParamOptions(
- HSTMT hstmt,
- UDWORD crow,
- UDWORD FAR *pirow)
- {
- return SQL_SUCCESS;
- }
-
-
- // Returns the number of parameter markers.
-
- SQL_PRE_API RETCODE SQL_API
- SQLNumParams(
- HSTMT hstmt,
- SWORD FAR *pcpar)
- {
- return SQL_SUCCESS;
- }
-
-
- // Sets options that control the behavior of cursors.
-
- SQL_PRE_API RETCODE SQL_API
- SQLSetScrollOptions( /* Use SQLSetStmtOptions */
- HSTMT hstmt,
- UWORD fConcurrency,
- SDWORD crowKeyset,
- UWORD crowRowset)
- {
- return SQL_SUCCESS;
- }
-
-
- // Set the cursor name on a statement handle
-
- SQL_PRE_API RETCODE SQL_API
- SQLSetCursorName(
- HSTMT hstmt,
- UCHAR FAR *szCursor,
- SWORD cbCursor)
- {
- return SQL_SUCCESS;
- }
-
-
- // Return the cursor name for a statement handle
-
- SQL_PRE_API RETCODE SQL_API
- SQLGetCursorName(
- HSTMT hstmt,
- UCHAR FAR *szCursor,
- SWORD cbCursorMax,
- SWORD FAR *pcbCursor)
- {
- return SQL_SUCCESS;
- }/* end SQLGetCursorName */
-